/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package digitaldreamers.games.ddmonsters.servers.gameserver.network.packets.sending;

import digitaldreamers.libraries.games.servers.networkmanagement.packets.sending.AbSendablePacket;
import digitaldreamers.games.ddmonsters.servers.gameserver.components.RoomComponent;
import digitaldreamers.games.ddmonsters.servers.gameserver.configurations.Configuration;
import java.io.DataOutputStream;
import java.io.IOException;

/**
 *
 * @author DaoLe
 */
public class SNewRoomCreatedPacket extends AbSendablePacket {
    private RoomComponent m_Room;
    
    public SNewRoomCreatedPacket(RoomComponent room) {
        m_Room = room;
        mPacketId = Configuration.NEW_ROOM_CREATED_PACKET_ID;
    }
    
    @Override
    public void writeData(DataOutputStream DOS) throws IOException {
        DOS.writeInt(mPacketId);
        DOS.writeLong(m_Room.getRoomID());
        //DOS.writeInt(room.getRoomRule().getRule());
        DOS.writeUTF(m_Room.getRoomMaster().getPlayerInformation().getLogin());
        //DOS.writeInt(room.getRoomMaster().getLevel());
    }
}
